<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
    <link rel="stylesheet" href="//cdn.bootcss.com/font-awesome/4.7.0/css/font-awesome.min.css">
    <style>
     
    </style>
</head>
<body>
    <span><i class="fa fa-pause play"></i></span>
    <script src="./node_modules/jquery/dist/jquery.min.js"></script>
    <script>
        $(".play").on("click",function(){
            $(this).toggleClass("fa-pause").toggleClass("fa-play")
        })
    </script>
</body>
</html>